<%-- 
    Document   : updateComment
    Created on : 13-08-2014, 22:29:04
    Author     : NGOCLINH-PC
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="Data.Member"%>
<%@page import="Data.Comment"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Data.RoleType"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<div class="tablemember">
    <form action="../MemberPR" method="post" name="formmember">  
        <h2 style="padding: 10px; color: #999;">Management Profile</h2>
        <hr />
        <table width="100%" border="0" align="center" cellpadding="14" cellspacing="14">
            <%
                if (request.getParameter("memID") != null) {
                    Member ct = new Member();
                    ArrayList<Member> a = ct.MselectByUser((String) session.getAttribute("ssuser"));
                    if (a.size() > 0) {
                        for (int i = 0; i < a.size(); i++) {
                            Member pay = a.get(i);
                            SimpleDateFormat sdf = new SimpleDateFormat("dd/MMM/yyyy");
            %>
            <tr>
                <td width='10%'>Member ID:</td>
                <td width='50%'><label  for='txtcateid'></label>
                    <% out.print("<input type='text' readonly name='txtmemberid' id='txtmemberid' value='" + pay.getMemberID() + "' /></td>");%>
            </tr>

            <tr>
                <td width="10%">Member Name:</td>
                <td width="57%"><label for="txtname"></label>
                    <% out.print("<input type='text'  name='txtname' id='txtname' value='" + pay.getMemberName() + "'/></td>");%>
            </tr>
            <tr>
                <td width="10%">Password:</td>
                <td width="57%"><label for="txtname"></label>
                    <% out.print("<input type='password'  name='txtPass' id='txtPass' value='" + pay.getPassword() + "'/></td>");%>
            </tr>

            <tr>
                <td width="10%">Email:</td>
                <td width="57%"><label for="txtemail"></label>
                    <% out.print("<input required   type='email' name='txtemail' id='txtemail' value='" + pay.getEmail() + "'/></td>");%>
            </tr>
            <tr>
                <td width="10%">Phone:</td>
                <td width="57%"><label for="txtphone"></label>
                    <% out.print("<input type='text'  name='txtphone' id='txtphone' value='" + pay.getPhone() + "'/></td>");%>
            </tr>
            <tr>
                <td width="10%">Gender:</td>
                <td width="57%"><label for="txtgender"></label>
                    <select name="txtgender"   class="txtgender">
                        <% if (pay.getGender().equalsIgnoreCase("1")) {
                                out.print("<option value='1' selected='selected'>Male</option>");
                                out.print("<option value='2'>Female</option>");
                            } else {
                                out.print("<option value='1'>Male</option>");
                                out.print("<option value='2' selected='selected'>Female</option>");
                            }
                        %>
                    </select>
            </tr>

            <tr>
                <td width="10%">Address:</td>
                <td width="57%"><label for="txtaddress"></label>
                    <% out.print("<textarea style='width: 300px; height: 50px;' name='txtaddress'>" + pay.getAddress() + "</textarea></td>");%>
            </tr>

            <tr> 
                <td width="10%">Birthday:</td>
                <td width="57%"><label for="txtbrithday"></label>
                    <% out.print("<input   name='txtbrithday' id='datepicker'  value='" + sdf.format(pay.getBirthday()) + "'/></td>");%>
            </tr>

            <tr align="">
                <td></td>
                <td colspan="2"><input type="submit" style="width: 90px; height: 30px; cursor: pointer" name="btnsubmit" id="btnsubmit" value="Submit" />
                </td>
            </tr>
            <%
                        }
                    }
                } else {
                }
            %>  
        </table>
    </form>
</div>